field<'model, 'target>Type
PackageReified.Schema
Declares one field inside
schema<'model> { }, and configures it when followed by a block.
Specification
Kind
Type
Members
32
Examples
0
``.ctor``Signature
field(getter)
ConstrainSignature
constrain constraint'
ConstrainSignature
constrain constraint'
ConstrainSignature
constrain constraint'
ConstraintsSignature
constraints constraints
Summary
| Name | Signature | Synopsis |
|---|---|---|
| ``.ctor`` | field(getter) | Declares a field, deriving its camel-cased wire name from the property getter. |
| Constrain | constrain constraint' | Adds a portable constraint to the field's current schema value. |
| Constrain | constrain constraint' | Adds another portable constraint to an inferred field schema. |
| Constrain | constrain constraint' | Adds a portable constraint to the field's current schema value. |
| Constraints | constraints constraints | Adds portable constraints to the field's current schema value in declaration order. |
| Constraints | constraints constraints | Adds portable constraints to the field's inferred schema in declaration order. |
| Constraints | constraints constraints | Adds portable constraints to the field's inferred schema in declaration order. |
| DefaultValue | defaultValue value | Supplies the field value when the input omits it. |
| DefaultValue | defaultValue value | Supplies the field value when the input omits it. |
| DefaultValue | defaultValue value | Supplies the field value when the input omits it. |
| Describe | describe text | Adds human-readable description metadata to the field's current schema. |
| Describe | describe text | Adds human-readable description metadata to the field's schema. |
| Describe | describe text | Adds human-readable description metadata to the field's schema. |
| Format | format format | Adds format metadata to the field's current schema. |
| Format | format format | Adds format metadata to the field's schema. |
| Format | format format | Adds format metadata to the field's schema. |
| MayOmit | mayOmit | Allows this option-typed field's boundary input to be omitted. |
| MustSupply | mustSupply | Requires this field's boundary input to be supplied. |
| MustSupply | mustSupply | Requires this field's boundary input to be supplied. |
| MustSupply | mustSupply | Requires this field's boundary input to be supplied. |
| Refine | refine | Refines the current raw schema with the destination type's canonical refinement. |
| Refine | refine refinement | Refines the current raw schema with an explicit refinement. |
| Run | this.Run | No description available. |
| Run | this.Run | No description available. |
| Run | this.Run | No description available. |
| Run | this.Run | No description available. |
| Validate | validate validation | Adds executable validation after the pending refinement. |
| Validate | validate validation | Adds executable validation to the field's current schema value. |
| Validate | validate validation | Adds another executable validation to an inferred field schema. |
| Validate | validate validation | Adds executable validation to the field's current schema value. |
| WithSchema | withSchema schema | Supplies the schema transformed by the remaining operations in this field block. |
| Yield | this.Yield | No description available. |
Declares a field, deriving its camel-cased wire name from the property getter.
Parameters
| Name | Type | Description |
|---|---|---|
| getter | Expr<('model -> 'target)> |
Returns
field<'model, 'target>
Verification Examples
type Signup = { Email: string }
field (fun (s: Signup) -> s.Email) // wire name "email"Adds a portable constraint to the field's current schema value.
Parameters
| Name | Type | Description |
|---|---|---|
| source | Constraint<'current> |
Returns
FieldWorking<'model, 'target, 'current>
Adds another portable constraint to an inferred field schema.
Parameters
| Name | Type | Description |
|---|---|---|
| source | Constraint<'target> |
Returns
FieldConfigured<'model, 'target>
Adds a portable constraint to the field's current schema value.
Parameters
| Name | Type | Description |
|---|---|---|
| initial | Constraint<'target> |
Returns
FieldConfigured<'model, 'target>
Adds portable constraints to the field's current schema value in declaration order.
Parameters
| Name | Type | Description |
|---|---|---|
| source | Constraint<'current> list |
Returns
FieldWorking<'model, 'target, 'current>
Adds portable constraints to the field's inferred schema in declaration order.
Parameters
| Name | Type | Description |
|---|---|---|
| source | Constraint<'target> list |
Returns
FieldConfigured<'model, 'target>
Adds portable constraints to the field's inferred schema in declaration order.
Parameters
| Name | Type | Description |
|---|---|---|
| initial | Constraint<'target> list |
Returns
FieldConfigured<'model, 'target>
Supplies the field value when the input omits it.
Parameters
| Name | Type | Description |
|---|---|---|
| source | 'current |
Returns
FieldWorking<'model, 'target, 'current>
Supplies the field value when the input omits it.
Parameters
| Name | Type | Description |
|---|---|---|
| source | 'target |
Returns
FieldConfigured<'model, 'target>
Supplies the field value when the input omits it.
Parameters
| Name | Type | Description |
|---|---|---|
| initial | 'target |
Returns
FieldConfigured<'model, 'target>
Adds human-readable description metadata to the field's current schema.
Parameters
| Name | Type | Description |
|---|---|---|
| source | string |
Returns
FieldWorking<'model, 'target, 'current>
Adds human-readable description metadata to the field's schema.
Parameters
| Name | Type | Description |
|---|---|---|
| source | string |
Returns
FieldConfigured<'model, 'target>
Adds human-readable description metadata to the field's schema.
Parameters
| Name | Type | Description |
|---|---|---|
| initial | string |
Returns
FieldConfigured<'model, 'target>
Adds format metadata to the field's current schema.
Parameters
| Name | Type | Description |
|---|---|---|
| source | SchemaFormat |
Returns
FieldWorking<'model, 'target, 'current>
Adds format metadata to the field's schema.
Parameters
| Name | Type | Description |
|---|---|---|
| source | SchemaFormat |
Returns
FieldConfigured<'model, 'target>
Adds format metadata to the field's schema.
Parameters
| Name | Type | Description |
|---|---|---|
| initial | SchemaFormat |
Returns
FieldConfigured<'model, 'target>
Allows this option-typed field's boundary input to be omitted.
Returns
FieldWorking<'model, 'target, 'current option>
Verification Examples
open Reified.SchemaDSL
type Signup = { Nickname: string option }
schema<Signup> {
field _.Nickname { mayOmit }
construct (fun nickname -> { Nickname = nickname })
}Requires this field's boundary input to be supplied.
Returns
FieldWorking<'model, 'target, 'current>
Requires this field's boundary input to be supplied.
Returns
FieldConfigured<'model, 'target>
Requires this field's boundary input to be supplied.
Returns
FieldConfigured<'model, 'target>
Verification Examples
open Reified.SchemaDSL
type Signup = { Name: string }
schema<Signup> {
field _.Name { mustSupply }
construct (fun name -> { Name = name })
}Refines the current raw schema with the destination type's canonical refinement.
Returns
FieldRefining<'model, 'target, 'raw>
Refines the current raw schema with an explicit refinement.
Parameters
| Name | Type | Description |
|---|---|---|
| source | Refinement<'raw, 'target> |
Returns
FieldWorking<'model, 'target, 'target>
Parameters
| Name | Type | Description |
|---|---|---|
| source | FieldWorking<'model, 'target, 'current> |
Returns
FieldDeclaration<'model, 'target>
Parameters
| Name | Type | Description |
|---|---|---|
| source | FieldRefining<'model, 'target, 'raw> |
Returns
RefiningFieldDeclaration<'model, 'raw, 'target>
Parameters
| Name | Type | Description |
|---|---|---|
| source | FieldConfigured<'model, 'target> |
Returns
ConfiguredFieldDeclaration<'model, 'target>
Parameters
| Name | Type | Description |
|---|---|---|
| source | FieldWorking<'model, 'target, 'target> |
Returns
FieldDeclaration<'model, 'target>
Adds executable validation after the pending refinement.
Parameters
| Name | Type | Description |
|---|---|---|
| source | 'target -> Result<unit, SchemaError> |
Returns
FieldRefining<'model, 'target, 'raw>
Adds executable validation to the field's current schema value.
Parameters
| Name | Type | Description |
|---|---|---|
| source | 'current -> Result<unit, SchemaError> |
Returns
FieldWorking<'model, 'target, 'current>
Adds another executable validation to an inferred field schema.
Parameters
| Name | Type | Description |
|---|---|---|
| source | 'target -> Result<unit, SchemaError> |
Returns
FieldConfigured<'model, 'target>
Adds executable validation to the field's current schema value.
Parameters
| Name | Type | Description |
|---|---|---|
| initial | 'target -> Result<unit, SchemaError> |
Returns
FieldConfigured<'model, 'target>
Supplies the schema transformed by the remaining operations in this field block.
Parameters
| Name | Type | Description |
|---|---|---|
| initial | Schema<'current> |
Returns
FieldWorking<'model, 'target, 'current>